]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screencastService: Use strings for states
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 28 Jan 2022 23:31:00 +0000 (00:31 +0100)
committerJonas Dreßler <verdre@v0yd.nl>
Tue, 25 Apr 2023 15:17:41 +0000 (17:17 +0200)
Using strings instead of numbers allows for easier debugging, it means
we can just log the state itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2197>

js/dbusServices/screencast/screencastService.js

index 7c08105677ad8ca17e242b1732f34be3478ed9f3..0a88b48f1fd097ca2f552eae1ae927921441c618 100644 (file)
@@ -29,16 +29,16 @@ const DEFAULT_FRAMERATE = 30;
 const DEFAULT_DRAW_CURSOR = true;
 
 const PipelineState = {
-    INIT: 0,
-    PLAYING: 1,
-    FLUSHING: 2,
-    STOPPED: 3,
+    INIT: 'INIT',
+    PLAYING: 'PLAYING',
+    FLUSHING: 'FLUSHING',
+    STOPPED: 'STOPPED',
 };
 
 const SessionState = {
-    INIT: 0,
-    ACTIVE: 1,
-    STOPPED: 2,
+    INIT: 'INIT',
+    ACTIVE: 'ACTIVE',
+    STOPPED: 'STOPPED',
 };
 
 var Recorder = class {